package patrol.mobile.com.mobilepatrol.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import patrol.mobile.com.mobilepatrol.R;

/**
 * Created by z on 2018/9/3.
 * Des:
 */

public class TestZzmAdapter extends RecyclerView.Adapter<TestZzmAdapter.ViewHolder> {
    @Override
    public TestZzmAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_test_zzm, parent, false);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(TestZzmAdapter.ViewHolder holder, int position) {
        holder.itemNum.setText((position + 1) + "");
    }

    @Override
    public int getItemCount() {
        return 6;
    }

    static class ViewHolder extends RecyclerView.ViewHolder {
        @BindView(R.id.item_num)
        TextView itemNum;

        ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}
